<!--
 * @Author: yaojian66 1327629137@qq.com
 * @Date: 2022-06-29 16:47:04
 * @LastEditors: yaojian66 1327629137@qq.com
 * @LastEditTime: 2022-06-29 16:54:59
 * @FilePath: \geyao\第九十八题 symbol.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>symbol</title>
</head>
<body>
<!-- 请补全JavaScript代码，要求以键/值对的对象形式返回参数数组。要求如下：
1. 键名的数据类型为Symbol
2. 键值为当前数组项
3. Symbol的描述为当前数组项
4. 返回普通对象 -->
<script type="text/javascript">
  const _symbolKey = array => {
      // 补全代码
      let object = {}
    for(item of array) {
        let key = Symbol(item)
        object[key] = item
    }
    return object
  }
</script>
</body>
</html>